import { createRouter,createWebHashHistory} from "vue-router";
const Home = () => import("../Home.vue")
const Doc = () => import("../Doc.vue")
const SwitchDemo =() =>import("../components/SwitchDemo.vue")
const Intro =()=> import("../components/Intro.vue")
const Start =()=> import("../components/Start.vue")
const Install =()=> import("../components/Install.vue")
const ButtonDemo =()=> import("../components/ButtonDemo.vue")
const DialogDemo =()=> import("../components/DialogDemo.vue")
const Tabs =()=> import("../components/TabsDemo.vue")
const Carousel = () =>import("../components/CarouselDemo.vue")
const routes = [
  { path: "/", redirect: "/Home" },
  {
    path: "/Home",
    name: "Home",
    component: Home
  },
  {
    path: "/doc",
    name: "Doc",
    component: Doc,
    children:[
      {path:'',component:Intro},
      {path:'Intro',component:Intro}, //介绍
      {path:'Install',component:Install}, //安装
      {path:'Start',component:Start}, //开始
      {path:'switch',component:SwitchDemo}, //switch文档
      {path:'button',component:ButtonDemo}, //button文档
      {path:'Dialog',component:DialogDemo}, //Dialog文档
      {path:'Tabs',component:Tabs}, //Tabs文档
      {path:'Carousel',component:Carousel} //轮播图文档
    ]
  },
]
export const router = createRouter({
    history: createWebHashHistory(),
    routes: routes
})